<template>
	<view style="bottom: 1rpx">
		<uni-goods-nav 
			:fill="true"  
			:options="options" 
			:buttonGroup="buttonGroup"  
			@click="onClick" 
			@buttonClick="buttonClick" 
			/>

	</view>
</template>
<!-- style="
	display: flex;
	text-align: center; 
	width: 100%; 
	position: fixed; 
	bottom: 1rpx; 
	flex-direction: row;" -->
<script>
	import { uniGoodsNav } from '@dcloudio/uni-ui';
	export default {
		components:{
			uniGoodsNav
		},
		name:"custGoodsNav",
		data() {
			return {
				options: [
					{
						icon: 'headphones',
						text: '客服'
					}, 
					{
						icon: 'shop',
						text: '店铺',
						info: 1,
						infoBackgroundColor:'#007aff',
						infoColor:"red"
					}, 
					{
						icon: 'cart',
						text: '购物车',
						info: 2
					},
				],
				buttonGroup: [
					{
					  text: '加入购物车',
					  backgroundColor: '#ff0000',
					  color: '#fff'
					},
					{
					  text: '立即购买',
					  backgroundColor: '#ffa200',
					  color: '#fff'
					}
				]
			};
		},
		methods: {
			onClick (e) {
				uni.showToast({
					title: `点击${e.content.text}`,
					icon: 'none'
				})
			},
			buttonClick (e) {
				console.log(e)
				this.options[2].info++
			}
		}
	}
</script>

<style>
</style>
